package com.cskaoyan.controller.wx_catalog_controller;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.wx_vo.catalog.CurrentWxCatalogVO;
import com.cskaoyan.bean.wx_vo.catalog.IndexWxCatalogVO;
import com.cskaoyan.service.wx_catalog_service.WxCatalogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description：
 * @author: 曹旭
 * @date: 2022/5/10 08:01
 */
@RestController
@RequestMapping("wx/catalog")
public class WxCatalogController {
    @Autowired
    WxCatalogService wxCatalogService;

    @RequestMapping("index")
    public BaseRespVo index() {
        IndexWxCatalogVO indexWxCatalogVO = this.wxCatalogService.index();
        return BaseRespVo.ok(indexWxCatalogVO);
    }

    @RequestMapping("current")
    public BaseRespVo current(Integer id) {
        CurrentWxCatalogVO currentWxCatalogVO = this.wxCatalogService.current(id);
        return BaseRespVo.ok(currentWxCatalogVO);
    }
}
